package com.xinsoft.utils.tree;

import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.parser.NodeParser;
import com.xinsoft.entity.dto.SysDeptUserDto;

/**
 * @Author Li9527
 * @Description 区划成树
 * @Date 2023/5/18 12:44
 **/
public class DeptUserNodeParser implements NodeParser<SysDeptUserDto, String> {


    @Override
    public void parse(SysDeptUserDto object, Tree<String> treeNode) {
        treeNode.setId(object.getId().toString());
        treeNode.setParentId(object.getParentId().toString());
        treeNode.setName(object.getDeptName());
        treeNode.put("uid",object.getUid());
        treeNode.put("userName",object.getUserName());
    }
}
